import {http} from "@/api/index";

const order = {
    getOrderList:'/order/findAll',
    addOrder:'/order/add',
    deleteOrderById:'/order/delete',
    updateOrder:'/order/update',
}


export const getOrderList = (params)=>{
    return http.request({
        url:order.getOrderList,
        method:'get',
        params: params
    })
}
export const addOrder = (params)=>{
    return http.request({
        url:order.addOrder,
        method:'post',
        data:params
    })
}
export const deleteOrderById = (orderId)=>{
    return http.request({
        url:order.deleteOrderById,
        method:'get',
        params:{
            orderId:orderId
        }
    })
}
export const updateOrder = (params)=>{
    return http.request({
        url:order.updateOrder,
        method:'post',
        data:params
    })
}

